<%=content_for :head do%>
<title>Listing products</title>
<%end%>
<%=render "shared/search"%>
<%=render "shared/logon"%>
<%=render "shared/giohang"%>
<%=render "shared/footer"%>
<%=render "shared/menu"%>
<h1>Listing products</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Decription</th>
    <th>Kind</th>
    <th>Price</th>
    <th>Image</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @products.each do |product| %>
  <tr>
    <td><%= product.title %></td>
    <td><%= product.decription %></td>
    <td><%= product.kind %></td>
    <td><%= product.price %></td>
    <td><%= product.image %></td>
    <td><%= link_to 'Show', product %></td>
    <td><%= link_to 'Edit', edit_product_path(product) %></td>
    <td><%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Product', new_product_path %>
